package com.neusoft.neuiotms.dcam.fixed.model.spareconsume;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;
import com.neusoft.neuiotms.dcam.fixed.model.SpareType;
import com.neusoft.neuiotms.dcam.fixed.model.Storehouse;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_spareconsume_back", comment = "备件领用退库利旧表")
@Table(name = "neuiot_spareconsume_back")
public class SpareConsumeBack extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    /** 工作流TaskId */
    @Length(max = 255, message = "工作流TaskId不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '工作流TaskId'")
    private String taskId;

    /** 工单号 */
    @Length(max = 50, message = "工单号不能超过{max}位")
    @Column(length = 50, nullable = false)
    @Comment("varchar(50) NOT NULL COMMENT '工单号'")
    private String workNum;

    /*** 货品编号 */
    private String storckNumber;

    /** 资产分类 */
    @ManyToOne
    private SpareType spareType;

    /** 规格型号 */
    private String specification;

    /** 存放库房 */
    @ManyToOne
    private Storehouse storehouse;

    /** SN 序列号 */
    private String sn;

}
